from playwright.async_api import async_playwright
import asyncio


async def mian():
    async with async_playwright() as p:
        # headless参数为是否是无头浏览器，默认是Ture则是无头
        browser = await p.chromium.launch(headless=False)  # 启动chrome浏览器
        page = await browser.new_page()  # 打开一个标签页
        await page.goto("https://magiskcn.com/magisk-download")  # 加载url
        title = await page.title()
        print(title)
        await browser.close()  # 浏览器对象


if __name__ == '__main__':
    asyncio.run(mian())
